import { HttpException } from "@nestjs/common";

class Errors {

    status = 500;

    argumentNull(name: string) {
        let msg = `Argument '${name}' is null or empty.`;
        return new HttpException(msg, this.status);
    }
    pathNotExists(path: string) {
        let msg = `Path '${path}' is not exists.`;
        return new HttpException(msg, this.status);
    }
    memberNull(memberName: string, objectName: string) {
        let msg = `Member '${memberName}' of object '${objectName}' is null or empty.`;
        return new HttpException(msg, this.status);
    }
}

let errors = new Errors();
export default errors;
